import request from '@/utils/request'

// 查询保险列表（树状）
export function listInsurance(query) {
  return request({
    url: '/dgw/insurance/list',
    method: 'get',
    params: query
  })
}
//树形数据（审核通过的数据）
export function treeListInsurance2(query) {
  return request({
    url: '/dgw/insurance/selectList2',
    method: 'get',
    params: query
  })
}
//树形数据（未审核的数据）
export function treeListInsurance1(query) {
  return request({
    url: '/dgw/insurance/selectList1',
    method: 'get',
    params: query
  })
}

export function treeListInsurance3(query){
  return request({
    url:'/dgw/insurance/selectList3',
    methode:'get',
    params:query
  })
}

// 查询保险详细
export function getInsurance(id) {
  return request({
    url: '/dgw/insurance/' + id,
    method: 'get'
  })
}

// 新增保险
export function addInsurance(data) {
  return request({
    url: '/dgw/insurance',
    method: 'post',
    data: data
  })
}

// 修改保险
export function updateInsurance(data) {
  return request({
    url: '/dgw/insurance',
    method: 'put',
    data: data
  })
}

// 删除保险
export function delInsurance(id) {
  return request({
    url: '/dgw/insurance/' + id,
    method: 'delete'
  })
}

// 导出保险
export function exportInsurance(query) {
  return request({
    url: '/dgw/insurance/export',
    method: 'get',
    params: query
  })
}
